<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>兑换记录</title>
		
		
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!-- jQuery文件。务必在bootstrap.min.js之前引入 -->
		<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
		
		<link rel="stylesheet" href="__STATIC__/jcweb/css/base.css" />	
		<link rel="stylesheet" href="__STATIC__/jcweb/css/my.css" />	
		<script src="__STATIC__/jcweb/js/utils.js"></script>		
		{include file="public/wxopera" /}
	</head>
	<body>
		
		{include file="public/footer" /}		
		
		<section class="sectionContent">
		<div id="history_div">
		{volist name="data" id="v"}
			
			<div class="rechargeline">
					<font class="floatLeft">兑换{$v['money']}元
					
					
					<span style="color:red;">
					(
					{if($v['type']==1)}
					余额
					{else}
					佣金
					{/if}
					)
					
					</span>
					</font>
					<font class="floatRight">{$v['create_time']}</font>
			</div>
			{/volist}
		</div>
		
			
			{if(count($data)==0)}
			<img src="__STATIC__/jcweb/img/nodata.jpg" class="fill-w"/>
			{else}
			<div id="more" class="flex h-center v-center" style="height:40px;background:#ccc">
				查看更多
				</div>
			{/if}
			</section>	
			<input type="hidden" id="pages" value="{$page}" />
		<script>
		$(function(){
		$("#more").click(function(){
		var apihost = "{$apihost}";
		var pages = parseInt($("#pages").val())+1;
		var  url= apihost+"getDHHis";
		post2(url,{page:pages},function(data){
		if(data.length<10){
		$("#more").unbind("click");
		$("#more").text("没有更多了");
		}else{
		$("#pages").val(pages);
		}
		for(var i=0;i<data.length;i++){
			var type = "";
			if(data[i]['type']==1){
				type="(余额)";
			}else{

				type="(佣金)";
			}
			
			
			
		var html='<div class="rechargeline"><font class="floatLeft">兑换'+data[i]['money']+'元<span style="color:red;">'+type+'</span></font><font class="floatRight">'+data[i]['create_time']+'</font></div>';
		$("#history_div").append(html);
		
		
		
		}
		
		});
		
		});
		});
		</script>	
		</body>
</html>
